<%--
    Document   : donhang_danhsach
    Created on : Nov 23, 2011, 8:51:06 PM
    Author     : kydrenw
--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<div class="box-head">Hóa Đơn</div>
<div>
    <lable style="margin-left: 10px;">Xem theo ngày : </lable>
    <input type="text" size="25" maxlength="25" id="date" onchange="javascript:ReloadHoadon()"/>
    <img style="cursor:pointer" onclick="javascript:NewCssCal('date','yyyyMMdd')" alt="" src="images/cal.gif"/>
    <lable>Trạng thái</lable>
    <select id="txtLoaiTT" name="txtLoaiTT" onchange="javascript:ReloadHoadon()">
        <option value="-1">tất cả</option>
        <c:forEach var="item" items="${dsTinhTrang}">
            <option value="${item.ma}">${item.ten}</option>
        </c:forEach>
    </select>
</div>
<div id="datacontent">
    <table width="100%">
        <tr>
            <td class="tbhead">Thời gian đặt hàng</td>
            <td class="tbhead">Khách hàng</td>
            <td class="tbhead">Người nhận</td>
            <td class="tbhead">Tổng tiền</td>
            <td class="tbhead">Trạng thái</td>
            <td class="tbhead">Thao tác</td>
        </tr>
        <c:forEach var="item" items="${ds}">
            <tr>
                <td class="tbcontent">${item.ngaydh}</td>
                <td class="tbcontent">${item.nguoidung.hoten}</td>
                <td class="tbcontent">${item.nguoinhan}</td>
                <td class="tbcontent">${item.tongtien}</td>
                <td class="tbcontent">${item.tinhtrang.ten}</td>
                <td class="tbcontent">
                    <input title="Chi tiết" type="button" class=" btn btnEdit" onclick="window.location='donhang.htm?action=chitiet&id=${item.mahd}'"/>
                    <input title="Duyệt" type="button" class=" btn btnSubmit" onclick="window.location='donhang.htm?action=duyet_hoadon&id=${item.mahd}'"/>
                    <input title="Xóa" type="button" class=" btn btnDel" onclick="window.location='donhang.htm?action=huy_hoadon&id=${item.mahd}'"/>
                </td>
            </tr>
        </c:forEach>
    </table>
</div>

<div class="command">
    <input type="button" class="button" value="Xuất danh sách hóa đơn" onclick="window.location='export.htm'"/>
</div>